Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[show_tech] modify generate_dump to includes BERT data and also the platform specified hw-mgmt info #3676

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mlok-nokia
Copy link
Contributor

@mlok-nokia mlok-nokia commented Dec 11, 2024

What I did

Modify the generate_dump to include the BERT data and the platform specified hw-mgmt info

How I did it

  1. Introduced a new function save_sys() which save the /sys/firmware/acpi/tables folder which container the BERT info.
  2. Follow the consistency to modify the collect_broadcom to the platform specified script hw-management-generate_dump.sh if this script exists.
  3. Enhance generate_dump to create log/files.timestamp.info to gather modification timestamp of all log files in the /var/log directory.

How to verify it

  1. Execute the "show techsupport" on both Supervisor and Linecard
  2. Download and open the show_tech file to verify the following info
  • folder hw-mgmt exists and contains the platform specified info
  • folder sys/ exists and contains the BERT info
  • file log/files.timestamp.info.gz should exist.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305
  • 202405

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mlok-nokia mlok-nokia force-pushed the show_tech_with_hwdump_and_sys branch from c93af87 to 65214ee Compare December 11, 2024 16:56
…w-mgmt info

Signed-off-by: mlok <marty.lok@nokia.com>
@mlok-nokia
Copy link
Contributor Author

@judyjoseph and @arlakshm This PR modify the show_tech to include BERT info and also the platform specified hw-mgmt-generate_dump.sh. I have verified that. It works fine. Please review it

@rlhui rlhui requested a review from judyjoseph December 18, 2024 18:30
@rlhui
Copy link
Contributor

rlhui commented Dec 18, 2024

@anamehra

@@ -1582,6 +1619,25 @@ collect_broadcom() {

copy_from_masic_docker "syncd" "/var/log/diagrun.log" "/var/log/diagrun.log"
copy_from_masic_docker "syncd" "/var/log/bcm_diag_post" "/var/log/bcm_diag_post"

# run 'hw-management-generate-dump.sh' script and save the result file
HW_DUMP_FILE=/usr/bin/hw-management-generate-dump.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should also cleanup the duplicate code in vendor specific functions, otherwise it will cause duplicate execution and increase run time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore, looks like being done only for broadcom.
Should we move it to common code?
The code gets executed only when vendor provide the executable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Melanox and Cisco have implemented the function call hw-management-generate-dump.sh under ASIC specified (collect_mellanox() and collect_cisco_8000. For Broadcom ASIC, we just follow the existing implemenation for avoid the duplicated function call.

    if [[ "$asic" = "mellanox" ]]; then
        collect_mellanox
    fi

    if [ "$asic" = "broadcom" ]; then
        collect_broadcom
    fi

    if [ "$asic" = "cisco-8000" ]; then
        collect_cisco_8000
    fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants